
<div class="panel panel-default">
    <div class="panel-heading">
        <div>
            {{cluster_status state=$res.clusterInfo.cluster_state}}
            <!--<a tabindex="0" style="color:#5bc0de" data-placement="bottom" class="detail-button" role="button" data-toggle="popover" data-trigger="focus" data-content="{{$res.clusterInfo}}"> [ detail ] </a>-->
            Cluster Nodes: <span class="label-info" id="cluster-known-nodes" data-size="{{$res.clusterInfo.cluster_known_nodes}}">{{$res.clusterInfo.cluster_known_nodes}}</span> | Master Size: <span class="label-info" id="cluster_size" data-size="{{$res.clusterInfo.cluster_size}}">{{$res.clusterInfo.cluster_size}}</span>
        </div>
        <div class="panel-heading-right">
            <div class="pointer node-operation"><a id="import-node">[Import Node]</a></div>
            <div class="pointer"><a id="batch-config">[Batch Config]</a></div>
            <!--<button type="button" id="query-db" class="btn btn-info"><span class="glyphicon glyphicon-search"></span> Query</button>-->
        </div>

    </div>
    <div class="panel-body" id="node-list-table">
        <table class="table table-bordered" id="nodes-table">
            <thead>
            <tr>
                <th style="width:100px">Expand <span class="glyphicon glyphicon-triangle-bottom pull-right pointer expand-all"></span></th>
                <th style="width:120px">
                    Status
                    <div class="pull-right">
                        <span class="badge status-type background-danger pointer table-title-span-button" data-type="fail" >bad <i class="icon-long-arrow-up"></i></span>
                        <span class="badge status-type background-success pointer table-title-span-button hide" data-type="ok">health <i class="icon-long-arrow-up"></i></span>
                    </div>
                </th>
                <th>Role</th>
                <th>Host</th>
                <th style="width:240px">Slot
                    <div class="pull-right">
                        <span class="badge slot-type background-danger pointer table-title-span-button" data-type="empty" >empty <i class="icon-long-arrow-up"></i></span>
                        <!--<span class="badge slot-type pointer table-title-span-button" data-type="normal">normal ↑</span>-->
                        <span class="badge slot-type background-warning pointer table-title-span-button" data-type="warn">warn <i class="icon-long-arrow-up"></i></span>
                    </div>
                </th>
                <th>Meta</th>
                <th>Options</th>
            </tr>
            </thead>
            <tbody id="nodes-details">
            {{assign name="index" value=0}}
            {{foreach from=$res.nodeList item=clusterNodes}}
                {{$index++}}
                <tr class="master {{new_node_show slaveList=$clusterNodes.slaveList}}" data-index="{{$index}}">
                    {{include file="cluster/redis_list_master_row.html"}}
                </tr>
                {{foreach from=$clusterNodes.slaveList item=slave}}
                <tr class="slave" data-index="{{$index}}">
                    {{include file="cluster/redis_list_slave_row.html"}}
                </tr>
                {{/foreach}}
            {{/foreach}}
            </tbody>
        </table>

    </div><!-- .panel-body -->
</div><!-- .panel -->